package cn.maxwell.feiclient;

import cn.maxwell.User;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class OrderUserFallback02 implements FallbackFactory<UserFeiGinClient> {
    @Override
    public UserFeiGinClient create(Throwable throwable) {
        return new UserFeiGinClient() {
            @Override
            public User loadById(Long id) {
                return new User(-1,"我被熔断了！","你丫别点了！");
            }
        };
    }
}
